package lab02.Test05;

public class Cube {
        //  属性:长、宽、高
        private int Long;

        private int Width;

        private int Height;


        //  方法
        public void setVariable(int Long,int Width,int Height){
            this.Long = Long;
            this.Width = Width;
            this.Height = Height;
        }
        public int getVolume(){
            return Long * Width * Height;
        }
        public Cube(int Long,int Width,int Height){
            this.Long = Long;
            this.Width = Width;
            this.Height = Height;
        }
        public static void main(String[] args){
            Cube cube = new Cube(10,10,10);
            cube.setVariable(15,15,15);
            cube.getVolume();
        }
}
